<!DOCTYPE html>
<html lang="en" ng-app='loklak'>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="Content-Language" content="en, english"/>
    <meta name="author" content="@shivenmian"> 
    <link rel="icon" type="image/x-icon" href="../../artwork/favicon.ico">
    <title>Register a public key</title> 
      
    <link href="../../css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="../../css/dashboard.css" rel="stylesheet" type="text/css">
    <link href="../../css/loklak.css" rel="stylesheet" type="text/css">
    <link href="css/style.css" rel="stylesheet" type="text/css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../../js/html5shiv.min.js"></script>
      <script src="../../js/respond.min.js"></script>
    <![endif]-->
    
    <script src="../../js/angular.min.js"></script>
    <script src="../../js/angular-route.min.js"></script>
    <script src="../../js/framework.js"></script>
    <script src="../../js/jquery.min.js"></script>
    <script src="js/registration.js"></script>
  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/"><img src="../../images/brand.png" height="24" style="float:left;"></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
          </ul>
        </div>
      </div>
    </nav>
    <br><br><br>
    
    <br>
    <div class = "form">
      <p><h1>Register a public key</h1></p>
      <br>
      <div id = "status-box"></div>
      <br>
      <div id="form">
        <div id="options_self">
          <input type = "checkbox" id = "self" checked>
          <label for = "self" id = "self_label">For this user</label>
        </div>
        <div class = "fields">
          <input type = "text" id="email" placeholder="Email" required>
        </div>
        <br>

        <div id="options_create">
          <input type = "checkbox" id = "create" checked>
          <label for = "create" id = "create_label">Create new key-pair</label>
        </div>

        <div id="options_general">
          <label id = "algorithm_label" for="algorithmSelect">Algorithm:</label>
          <select id="algorithmSelect"></select>
          <label id = "type_label" for="typeSelect">Key type:</label>
          <select id="typeSelect"></select>
          <label id = "keysize_label" for="keysizeSelect">Key size:</label>
          <select id="keysizeSelect"></select>
        </div>
        <br>


        <textarea id="key" cols="80" rows="30" placeholder="Public Key"></textarea>

        <br>

        <br>
        <button id = "register">Register</button>
      </div>
      <div id="output" class="hidden">
        <label id="hash_label" for="hash">Key Hash</label><br>
        <textarea id="hash" class="text" cols="80" rows="1" readonly></textarea>
        <br>
        <label id="hash_label_URLSAVE" for="hash_URLSAVE">Key Hash URL-save</label><br>
        <textarea id="hash_URLSAVE" class="text" cols="80" rows="1" readonly></textarea>
        <p><br></p>
        <p>DER + BASE64 format (mostly used in java projects)</p>
        <br>
        <label id="pubkey_DER_label" for="pubkey_DER" >Public Key</label><br>
        <textarea id="pubkey_DER" class="text" cols="80" rows="7" readonly></textarea>
        <br><br>
        <label id="privkey_DER_label" for="privkey_DER" class="hidden">Private Key</label><br>
        <textarea id="privkey_DER" class="hidden text" cols="80" rows="30" readonly></textarea>
        <p><br></p>
        <p>PEM format (common in other projects like OpenSSL)</p>
        <br>
        <label id="pubkey_PEM_label" for="pubkey_PEM" >Public Key</label><br>
        <textarea id="pubkey_PEM" class="text" cols="80" rows="7" readonly></textarea>
        <br><br>
        <label id="privkey_PEM_label" for="privkey_PEM" class="hidden">Private Key</label><br>
        <textarea id="privkey_PEM" class="hidden text" cols="80" rows="30" readonly></textarea>
      </div>
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../../js/ie10-viewport-bug-workaround.js"></script>
  </body>
</html>
